home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / setup_ut / jwpcstp2 / path.frm < prev    next >
Text File  |  1995-01-07  |  5KB  |  168 lines

  1. VERSION 2.00
  2. Begin Form PathDlg 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "PathDlg"
  5.    ClientHeight    =   2235
  6.    ClientLeft      =   1320
  7.    ClientTop       =   2265
  8.    ClientWidth     =   6825
  9.    ControlBox      =   0   'False
  10.    Height          =   2640
  11.    Left            =   1260
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   540
  17.    ScaleWidth      =   540
  18.    Top             =   1920
  19.    Width           =   6945
  20.    Begin SSPanel Panel3D1 
  21.       BevelWidth      =   5
  22.       Height          =   2265
  23.       Left            =   0
  24.       TabIndex        =   6
  25.       Top             =   0
  26.       Width           =   6855
  27.       Begin CommandButton Command3 
  28.          Caption         =   "&About"
  29.          Height          =   555
  30.          Left            =   5370
  31.          TabIndex        =   11
  32.          Top             =   1650
  33.          Width           =   1425
  34.       End
  35.       Begin CommandButton Command2 
  36.          Caption         =   "&Exit Setup"
  37.          Height          =   375
  38.          Left            =   3480
  39.          TabIndex        =   10
  40.          Top             =   1710
  41.          Width           =   1575
  42.       End
  43.       Begin CommandButton Command1 
  44.          Caption         =   "&Continue"
  45.          Default         =   -1  'True
  46.          Height          =   375
  47.          Left            =   1320
  48.          TabIndex        =   9
  49.          Top             =   1710
  50.          Width           =   1575
  51.       End
  52.       Begin TextBox Text1 
  53.          Height          =   375
  54.          Left            =   2520
  55.          TabIndex        =   8
  56.          Top             =   750
  57.          Width           =   3735
  58.       End
  59.       Begin PictureBox Picture1 
  60.          AutoSize        =   -1  'True
  61.          BackColor       =   &H00C0C0C0&
  62.          BorderStyle     =   0  'None
  63.          Height          =   480
  64.          Left            =   360
  65.          Picture         =   PATH.FRX:0000
  66.          ScaleHeight     =   480
  67.          ScaleWidth      =   480
  68.          TabIndex        =   7
  69.          TabStop         =   0   'False
  70.          Top             =   150
  71.          Width           =   480
  72.       End
  73.       Begin Label outPath 
  74.          BackStyle       =   0  'Transparent
  75.          Caption         =   "outPath"
  76.          Height          =   255
  77.          Left            =   120
  78.          TabIndex        =   0
  79.          Top             =   1590
  80.          Visible         =   0   'False
  81.          Width           =   855
  82.       End
  83.       Begin Label Label3 
  84.          BackStyle       =   0  'Transparent
  85.          Caption         =   "To quit Setup, choose the Exit button."
  86.          Height          =   255
  87.          Left            =   1320
  88.          TabIndex        =   1
  89.          Top             =   1230
  90.          Width           =   3615
  91.       End
  92.       Begin Label outButton 
  93.          BackStyle       =   0  'Transparent
  94.          Caption         =   "outButton"
  95.          Height          =   255
  96.          Left            =   120
  97.          TabIndex        =   2
  98.          Top             =   1230
  99.          Visible         =   0   'False
  100.          Width           =   975
  101.       End
  102.       Begin Label inDrive 
  103.          BackStyle       =   0  'Transparent
  104.          Caption         =   "inDrive"
  105.          Height          =   255
  106.          Left            =   120
  107.          TabIndex        =   3
  108.          Top             =   870
  109.          Visible         =   0   'False
  110.          Width           =   735
  111.       End
  112.       Begin Label Label2 
  113.          Alignment       =   1  'Right Justify
  114.          BackStyle       =   0  'Transparent
  115.          Caption         =   "Install to:"
  116.          Height          =   255
  117.          Left            =   840
  118.          TabIndex        =   4
  119.          Top             =   810
  120.          Width           =   1575
  121.       End
  122.       Begin Label Label1 
  123.          BackStyle       =   0  'Transparent
  124.          Height          =   495
  125.          Left            =   1320
  126.          TabIndex        =   5
  127.          Top             =   150
  128.          Width           =   5415
  129.       End
  130.    End
  131. End
  132.  
  133. Dim DestPath$
  134.  
  135. Sub Command1_Click ()
  136.     DestPath$ = text1.Text
  137.     inDrive.Tag = Left$(DestPath$, 2)
  138.  
  139.     '-------------------------------------------
  140.     ' The IsValidPath function not only returns
  141.     ' True/False as to whether or not it is a valid
  142.     ' path, but also reformats the path variable
  143.     ' into the format, "X:\dir\dir\dir\"
  144.     '-------------------------------------------
  145.     If IsValidPath(DestPath$, (inDrive.Tag)) Then
  146.         OutPath.Tag = DestPath$
  147.         OutButton.Tag = "continue"
  148.         PathDlg.Hide
  149.     Else
  150.         MsgBox "Not a valid path.", 48, PathDlg.Caption
  151.         text1.SetFocus
  152.         text1.SelStart = 0
  153.         text1.SelLength = Len(text1.Text)
  154.     End If
  155. End Sub
  156.  
  157. Sub Command2_Click ()
  158.     OutButton.Tag = "exit"
  159.     PathDlg.Hide
  160. End Sub
  161.  
  162. Sub Command3_Click ()
  163. form1.Show 1
  164.  
  165.  
  166. End Sub
  167.  
  168.